package com.xq.tmall.service.impl;

import com.xq.tmall.dao.AdminMapper;
import com.xq.tmall.entity.User;
import com.xq.tmall.service.AdminService;
import com.xq.tmall.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public boolean add(User admin) {
        return adminMapper.insertOne(admin)>0;
    }

    @Override
    public Integer getTotal(String admin_name) {
        return adminMapper.selectTotal(admin_name);
    }
}
